<!-- BEGIN PAGE HEADER-->
<?php $this->load->view('partials/breadcrumb.tpl', Array('_BTN_GROUP'=>array('url'=>site_url($thisModule.$thisController),  'class'=>'btn default', 'name'=>'返回列表', 'i'=>'<i class="m-icon-swapleft"></i>')))?>
<!-- END PAGE HEADER-->
<!-- BEGIN PAGE CONTENT-->
<div class="row">
	<div class="col-xs-12 ">
		<!-- BEGIN SAMPLE FORM PORTLET-->
		<div class="portlet">
			<div class="tabbable">
				<div class="tab-content">
					<div class="tab-pane active" id="tab_1">
						<!-- 订单信息和顾客信息开始 -->
						<div class="row">
							<div class="col-md-6 col-sm-12">
								<div class="portlet box green">
									<div class="portlet-title">
										<div class="caption">
											<i class="fa fa-cogs"></i>订单信息
										</div>
									</div>
									<div class="portlet-body" style="line-height:25px;">
										<div class="row static-info">
											<div class="col-xs-3 name">订单号:</div>
											<div class="col-xs-9 value">
												<span><?=htmlspecialchars($order->no)?></span>
											</div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">创建时间:</div>
											<div class="col-xs-9 value">
												<span><?=date('Y-m-d H:i:s', $order->create_time)?> </span>
											</div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">订单数量:</div>
											<div class="col-xs-9 value"><?=$order->amount?></div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">选择通道方式:</div>
											<div class="col-xs-9 value">
											
											<?php if(strpos($order->pay_channel,'SELFBANK')!==FALSE):?>
											自有通道编号 【 <?php $arr = explode('_', $order->pay_channel);echo $arr[1];?> 】
											<?php else:?>
											<?=htmlspecialchars($paymentType?$paymentType->name.' —— '.$order->pay_channel:$order->pay_channel)?>
											<?php endif;?>
											</div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">通道状态:</div>
											<div class="col-xs-9 value"><span style="cursor:text" class="<?=element($order->pay_status, $this->pay_status_css, '')?>"><?=IOSS_Order::getPayState($order->pay_status)?></span></div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">通道流水号:</div>
											<div class="col-xs-9 value">
												<span>
												<?php if($order->pay_transaction):?>
												<?=$order->pay_transaction?>
												<?php endif;?>
												</span>
											</div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">通道确认时间:</div>
											<div class="col-xs-9 value">
												<span>
												<?php if($order->pay_time>0):?>
												<?php echo date('Y-m-d H:i:s', $order->pay_time);?>
												<?php endif;?>
												</span>
											</div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">平台状态:</div>
											<div class="col-xs-9 value"><span style="cursor:text" class="<?=element($order->transfer_status, $this->transfer_status_css, '')?>"><?=IOSS_Order::getRechargeState($order->transfer_status)?></span>
											<?php if($p->edit):?>
											<?php if($order->pay_status == IOSS_Order::PAY_STATE_PAID && $order->transfer_status == IOSS_Order::PAY_STATE_NOT_RECHARGED){?>
												&nbsp; <a class="btn btn-xs btn-link" style="" onclick="return confirm('确定要给该订单平台转移吗？');" href="<?=site_url($thisModule.$thisController.'/recharge/'.$order->id.'/'.$order->update_time)?>">
												<i class="fa fa-check icon-info"></i>&nbsp;点击平台转移&nbsp;</a>
											<?php }?>
											<?php endif;?>
											</div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">平台确认时间:</div>
											<div class="col-xs-9 value">
												<span>
												<?php if($order->transfer_time>0):?>
												<?php echo date('Y-m-d H:i:s', $order->transfer_time);?>
												<?php endif;?>
												</span>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col-md-6 col-sm-12">
								<div class="portlet green box">
									<div class="portlet-title">
										<div class="caption"><i class="fa fa-cogs"></i> 用户信息</div>
									</div>
									<div class="portlet-body" style="line-height:25px;">
										<div class="row static-info">
											<div class="col-xs-3 name">账号:</div>
											<div class="col-xs-9 value" ><?=htmlspecialchars($userInfo->account)?></div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">邮箱:</div>
											<div class="col-xs-9 value" ><?=htmlspecialchars($userInfo->email)?></div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">微信:</div>
											<div class="col-xs-9 value" ><?=htmlspecialchars($userInfo->weixin)?></div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">QQ:</div>
											<div class="col-xs-9 value" ><?=htmlspecialchars($userInfo->qq)?></div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">注册时间:</div>
											<div class="col-xs-9 value" ><?=date('Y-m-d H:i:s',$userInfo->create_time)?></div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">注册IP:</div>
											<div class="col-xs-9 value" ><?=htmlspecialchars($userInfo->reg_ip)?></div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- 订单信息和顾客信息结束 -->
						<!-- 订单操作记录开始 -->
						<div class="portlet">
							<div class="portlet-title" id="log_type_tit">
								<div class="caption">
									<i class="fa fa-history"></i>订单操作记录
								</div>
							</div>
							<script type="text/javascript">
							$(document).ready(function(){
								$("[name=log_type]").change(function(){
									$("[data-log-type]").hide();
									if($(this).val() == 'all'){
										$("[data-log-type]").show();
									}else{
										$("[data-log-type="+$(this).val()+"]").show();
									}
									$(document).scrollTop($("#log_type_tit")[0].offsetTop);
								});
							});
							</script>
							<div class="portlet-body" id="log_type_body">
								<!-- 时间轴 -->
								<div class="timeline">
								<?php $typePics = $this->config->item('order_log_type_css');?>
								<?php foreach ($orderLogList as $v){?>
									<div class="timeline-item">
										<div class="timeline-badge timeline_pic">
											<img class="timeline-badge-userpic" src="<?=image_url('/static/assets/admin/img/write.png')?>">
										</div>
										<div class="timeline-body timeline_mg">
											<div class="timeline-body-arrow">
											</div>
											<div class="timeline-body-head">
												<div class="timeline-body-head-caption">
													<a href="javascript:;" class="timeline-body-title font-blue-madison"><?=htmlspecialchars($v->admin_name.'('.$v->admin_account.')')?></a>
													<span class="timeline-body-time font-grey-cascade"><?=date('Y-m-d H:i:s', $v->create_time)?></span>
												</div>
											</div>
											<div class="timeline-body-content" style="word-break:break-all;">
												<span class="font-grey-cascade">
													<span style="cursor:text" class="<?=element($order->pay_status, $this->pay_status_css, '')?>"><?=IOSS_Order::getPayState($v->pay_status)?></span>
													<span style="cursor:text" class="<?=element($order->transfer_status, $this->transfer_status_css, '')?>"><?=IOSS_Order::getRechargeState($v->transfer_status)?></span>
													<span><?=htmlspecialchars($v->note)?></span>
												</span>
											</div>
										</div>
									</div>
								<?php }?>
								</div>
							</div>
						</div>
						<!-- 订单操作记录结束 -->
					</div>
				</div>
			</div>
		</div>
		<!-- END SAMPLE FORM PORTLET-->
	</div>
</div>
<!-- END PAGE CONTENT-->
